// 拼接HTTPUrl
function url(type, pathname) {
  return window.RPConfig[type] + pathname
}

const readApi = {
  getBpmpApprovalPage: params => {
    return $http.post(url('itShare', '/bpmp/approval/page'), params)
  },
  getReadTableList: params => {
    return $http.post(url('itShare', '/itsRemindRecord/pages'), params)
  },
  readRow: params => {
    return $http.post(url('itShare', `/itsRemindRecord/changeState?id=${params.id}`), params)
  },
  getDetail: params => {
    return $http.get(url('itShare', '/itsRemindRecord/getById'), params)
  },
  bpmpRefresh: params => {
    return $http.get(url('itShare', '/bpmp/refresh'), params)
  },
  // 根据流程id和任务id获取流程详情URL
  getProcessUrl: (params) => {
    return $http.get(url('itShare', "/bpmp/getPcFormURLNoHost"),params)
  },
}

export default readApi
